import { http } from '@/utils/http'

export interface CalendarParams {
  Type?: number[]
  startTime?: string
  endTime?: string
  paStatus?: number
  types?: string
  page?: number
  limit?: number
}

export interface CalendarItem {
  id: number
  title: string
  type: number
  resId: number
  start: string
  end: string
  complete: number
}

/* 日历列表 */
export const getCalendarList = ({
  Type,
  startTime,
  endTime,
  paStatus,
  types,
  page,
  limit,
}: {
  Type?: number[]
  startTime?: string
  endTime?: string
  paStatus?: number
  types?: string
  page?: number
  limit?: number
}): Promise<IResData<CalendarItem[]>> => {
  return http.get<CalendarItem[]>('/api/MP/GetMyCalendarList', {
    Type,
    startTime,
    endTime,
    paStatus,
    types,
    page,
    limit,
  })
}
